﻿<%@ Page Language="C#" MasterPageFile="~/Master/MasterPage2.master" AutoEventWireup="True" CodeBehind="chartTest.aspx.cs" Inherits="TotalDrugs_chartTest" Title="无标题页" %>

<%@ Register Src="~/Common/QueryControl.ascx" TagName="QueryControl" TagPrefix="uc1" %>
<%@ Register src="../Common/ChartControl.ascx" tagname="ChartControl" tagprefix="uc2" %>
<%@ Register assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

    <script language="javascript" type="text/javascript">
    function txtClear()
    {
       var txtBox=document.getElementsByTagName("input")
       for(var i=0;i<txtBox.length;i++)
       {
          if(txtBox[i].type=="text")
          {
          txtBox[i].value="";
          }
       }
       document.getElementById("ctl00_ContentPlaceHolder1_ddlQualityLevel").selectedIndex=0;
       document.getElementById("ctl00_ContentPlaceHolder1_ddlInsuranceType").selectedIndex=0;
       document.getElementById("ctl00_ContentPlaceHolder1_ddlSortName").selectedIndex=0;
       document.getElementById("ctl00_ContentPlaceHolder1_ddlLevels").selectedIndex=0;
    }
    </script>

    <script type="text/javascript" src="../Scripts/My97DatePicker/WdatePicker.js"></script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 
    <div id="tabcontent">
    <uc1:QueryControl ID="QueryControl1" runat="server"  />
          
    </div>
 
        
 
        <asp:GridView ID="gvwInfo" runat="server" EmptyDataText="暂无符合条件的数据！" AutoGenerateColumns="False"
            CssClass="mainlist"
            DataKeyNames="HospitalID" onrowcommand="gvwInfo_RowCommand">
            <Columns>
                <asp:TemplateField HeaderText="序号">
                    <ItemTemplate>
                        <%#Container.DataItemIndex + 1 + AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex-1) %></ItemTemplate>
                    <HeaderStyle Width="30px" />
                </asp:TemplateField>
                <asp:BoundField DataField="OrderID" HeaderText="订单编号" />
                <asp:BoundField DataField="HospitalID" HeaderText="医院编号" />
                <asp:BoundField DataField="OrderName" HeaderText="订单名称" />
                
                <asp:BoundField DataField="StartTime" HeaderText ="开始时间" ReadOnly="true" DataFormatString="{0:yyyy-MM-dd}"/>
                <asp:BoundField DataField="PlanEndTime" HeaderText="结束时间" ReadOnly="true" DataFormatString="{0:yyyy-MM-dd}"/>
                <asp:BoundField DataField="HospitalName" HeaderText="医院名称" />
                <%--<asp:BoundField DataField="Remarks" HeaderText = "备注" /> --%>
                <asp:BoundField DataField="PurchaseCountTotal" HeaderText="采购总数量" />
                <asp:BoundField DataField="PurchaseAmountTotal" HeaderText="采购总金额" /> 
                <asp:BoundField DataField="CountOrder" HeaderText="采购次数" />
                <asp:BoundField DataField="PriceAvg" HeaderText="平均采购价" DataFormatString = "{0:F3}"/>
                <asp:BoundField DataField="DistributeRate" HeaderText="配送率" DataFormatString="{0:P2}"/>
                <asp:BoundField DataField="DistributeCountTotal" HeaderText="总配送量" />
                <asp:BoundField DataField="WareHouseCountTotal" HeaderText="入库总数量" />
                <asp:BoundField DataField="WareHouseAmountTotal" HeaderText="入库总金额" />
                <asp:BoundField DataField="WareHouseRate" HeaderText="入库率" DataFormatString="{0:P2}"/>  
                <asp:BoundField DataField="TotalAmount" HeaderText="订单总金额" />
                 <asp:TemplateField HeaderText="查看详情"> 
                    <ItemTemplate> 
                    <asp:LinkButton ID="lbnCom_PS" runat="server" CommandName="DirectByCom" CommandArgument='<%# Eval("OrderID") %>'
                        ToolTip="按不同的配送企业来查看该订单的药品交易情况">按配送企业查看</asp:LinkButton>  
                    
                    <asp:LinkButton ID="lbnDrug" runat="server" CommandName="DierectByDrug" CommandArgument='<%# Eval("OrderID") %>'
                        ToolTip="按不同的药品来查看该医院的药品交易情况">按药品查看</asp:LinkButton>
                    
                    <asp:LinkButton ID="lbnDetail" runat="server" CommandName="DierectByDetail" CommandArgument='<%# Eval("OrderID") %>' 
                        ToolTip="查看该订单的药品交易详细情况">查看详情</asp:LinkButton>   
                </ItemTemplate>
                </asp:TemplateField>
                 <asp:TemplateField HeaderText="其它">
                    <%--<ItemTemplate>
                        <asp:DropDownList ID="ddlOther" runat="server" AutoPostBack="True" 
                             onselectedindexchanged="ddlOther_SelectedIndexChanged" 
                            DataSourceID="XmlDataSource1" DataTextField="Name" DataValueField="Id">
                         </asp:DropDownList>
                    </ItemTemplate>--%>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
         
        <div class="page">
            <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_OnPageChanged">
            </webdiyer:AspNetPager>
        </div>
        <div class="listip">
        <ul>
            <uc2:ChartControl ID="ChartControl1" 
                    runat="server" />
            <li>说明:<span>可以点击相应按钮进入查看详细信息</span>
                </li>
        </ul>
    </div>
</asp:Content>
